/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bpr.webservice.domain;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 *
 * @author yogi
 */
@Entity
public class Menuaccess {
    @Id
    @SequenceGenerator(name="menuaccess_menuaccess_id",sequenceName="menuaccess_id_seq", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="menuaccess_menuaccess_id")
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Basic(optional = false)
    @Column(name = "levels")
    private int levels;
    @Basic(optional = false)
    @Column(name = "parent")
    private int parent;
    @JsonIgnore
    @JoinColumn(name = "userid", referencedColumnName = "userid")
    @ManyToOne(fetch = FetchType.LAZY)
    private Users userid;
    @JsonIgnore
    @JoinColumn(name = "menuid", referencedColumnName = "menuid")
    @ManyToOne(fetch = FetchType.LAZY)
    private Menu menuid;
	public Menuaccess() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public int getLevels() {
		return levels;
	}
	public void setLevels(int levels) {
		this.levels = levels;
	}
	public int getParent() {
		return parent;
	}
	public void setParent(int parent) {
		this.parent = parent;
	}
	public Users getUserid() {
		return userid;
	}
	public void setUserid(Users userid) {
		this.userid = userid;
	}
	public Menu getMenuid() {
		return menuid;
	}
	public void setMenuid(Menu menuid) {
		this.menuid = menuid;
	}
    
    

}
